<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Header extends  MY_Controller{
	
	public function index()
	{
		$this->setTitle('MyZone - 分享你我世界的精彩');
		$this->setKeywords('MyZone');
		$this->setDescription('获取各种平台数据数据，整合哦');

		$this->addStyle('public/css/bootstrap/bootstrap.css');
		$this->addStyle('public/css/bootstrap/bootstrap-responsive.css');
		
		$this->addStyle('public/css/font-awesome.css');
		$this->addStyle('public/css/prettyPhoto.css');
		$this->addStyle('public/css/slider.css');
		$this->addStyle('public/css/flexslider.css');
		$this->addStyle('public/css/style.css');
		$this->addStyle('public/css/lblue.css');
		
		$this->addStyle('public/css/header.css');


		
		
		$this->addScript('public/js/jquery.js');
		$this->addScript('public/js/bootstrap/bootstrap.js');
		$this->addScript('public/js/jquery.isotope.js');
		$this->addScript('public/js/jquery.prettyPhoto.js');
		$this->addScript('public/js/jquery.cslider.js');
		$this->addScript('public/js/modernizr.custom.28468.js');
		$this->addScript('public/js/filter.js');
		$this->addScript('public/js/cycle.js');
		$this->addScript('public/js/jquery.flexslider-min.js');
		$this->addScript('public/js/jquery.tweet.js');
		$this->addScript('public/js/easing.js');
		$this->addScript('public/js/custom.js');
		
		$this->addLink('public/img/favicon.png', 'shortcut icon');
		
		$this->data['menu_links'] = array(
				'home' => "index.php/home",
				'login' => "index.php/account/login",
				'reg'   => "index.php/account/reg",
				'sign' => 'index.php/sign/sign',
				'douban_live' => 'index.php/douban/live',
				'douban_rank' => 'index.php/douban/rank',
				'douban_email' =>'index.php/douban/email',
				'douban_friend' =>'index.php/douban/friend',
				'oauth2_douban' => 'index.php/oauth2/douban',
				'oauth2_tsina'  => 'index.php/oauth2/tsina',
				
				);
		
		$arrUser = $this->my_member->getUser();
		
		if (!empty($arrUser))
		{
			$this->data['arrUser'] = $arrUser;
		}
		else 
		{
			$this->data['arrUser'] = array();
		}
		
		$this->data['_doc'] = $GLOBALS['_doc'];
		
		
		$this->data['ajaxUrl'] = array(
				'loginout'=>'index.php/account/login/logout',
				);
		

		return $this->load->view('common/header',$this->data,TRUE);
	}
	
}